Peripheral devices such as disk drives used in processor-based systems are typically slower than other circuitry in those systems. There have been many attempts to increase the performance of disk drives. However, because disk drives are electromechanical, there may be a finite limit beyond which performance cannot be increased. One way to reduce an information bottleneck at a peripheral device, such as a disk drive, is to use a cache. A cache is a memory device that logically resides between a device, such as a disk drive, and the remainder of the system, that serves as a temporary storage area for the device. Frequently accessed data resides in the cache after an initial access. Subsequent accesses to the same data may be made to the cache instead of to the disk drive.
To obtain the greatest benefit of caching data from a storage device such as a disk drive, data that is placed and maintained in the cache can be prioritized. Typically, data is inserted on an access and (if necessary) the least recently used data in the cache is evicted to make room for the newly accessed data. In many workloads, such a policy works well because there is a high degree of temporal locality in access patterns. However, there are workloads for which this method is sub-optimal. An important example is streaming data access patterns. Streaming data can flush useful data from the cache without obtaining any benefit from the cache itself. In fact, streaming accesses can actually cause performance to be worse with a cache than without a cache, due to the overhead of inserting data into the cache for which no benefit is obtained. A need thus exists to more effectively use cache resources.